<template>
  <div class="content">
    <el-image  :src="bannerUrl" :fit="'cover'" />
  </div>
</template>

<script>
export default {
  name: "HomeView",
  data(){
    return {
      bannerUrl:"http://cdn.jiangaifeng.com/banner/",
    }
  },
  created(){
    this.initBanner();
  },
  methods: {
    initBanner: function (){
      var Range = 65;
      var Rand = Math.random();
      var index = 1 + Math.round( Rand * Range );
      this.bannerUrl = this.bannerUrl + index + ".jpg";
    },
  },
}
</script>

<style scoped>
  .content{
    padding: 30px 0;
    text-align: center;
    flex-grow: 1;
    min-height: 700px;
  }
</style>
